<?php
namespace App\Models\V1;
use DB;
use App\Models\V1\MemberModel;

class PrisidentModel extends MemberModel{

    //获取会长信息
    public function prisident_info($userId){
        $prisidentInfo = DB::table('chapter_prisident')
            ->where('user_id',$userId)
            ->where('is_delete',0)
            ->first();

        if(!$prisidentInfo){
            return false;
        }

        $memberBaseInfo = $this->get_member_info_by_id($userId);
        foreach($memberBaseInfo as $k => $v){
            $prisidentInfo->$k = $v;
        }
        return $prisidentInfo;
    }




}